<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>{{ user }}'s Watchlist</title>
    <link rel="icon" href="{{ url_for('static',filename='favicon.ico')}}">
    <link rel="stylesheet" href="{{ url_for('static',filename='style.css') }}" type="text/css">
</head>
<!-- 
    原项目地址为：http://helloflask.com/tutorial/
 -->

<body>
    <h2>
        <img alt="Avatar" class="avatar" src="{{ url_for('static',filename='images/avatar.png') }}">
        {{ user }}'s Watchlist
    </h2>
    {# 使用 length 过滤器获取movies 变量的长度 #} <p>{{ movies|length }} Title</p>
    <ul class="movie-list">
        {% for movie in movies %} {# 迭代 movies 变量 #}
        <li>{{ movie.title }} - {{ movie.year }}</li> {# 等同于 movie['title'] #}
        {% endfor %} {# 使用 endfor 标签结束 for 语句 #}
    </ul>
    <img alt="Walking Totoro" class="totoro" src="{{ url_for('static',filename='images/totoro.gif') }}">

    <footer>
        <small>&copy; 2018 <a href="http://helloflask.com/tutorial">HelloFlask</a> </small>
    </footer>
</body>

</html>